<?php

namespace app\model;

class Payment extends PaymentBase
{
    public static function onBeforeInsert($model)
    {
        $model->code = $model->code ?: date('YmdHis') . rand(1000, 9999);
    }
}
